/*
 * Created: 2022-09-13 19:50:24
 * Author : 涛涛涛
 */

import React, { FC } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { useClassName } from '@/utils/index';
import { Form, Button } from 'antd-mobile';
import JYInput from '@/components/JYInput/JYInput';
export interface IProps extends ICompProps {}
TestJYInput.defaultProps = {} as Partial<IProps>;
function TestJYInput(props: IProps) {
    const { className, style } = props;
    const localClassName = useClassName('TestJYInput', className);
    const onFinish = (values: any) => {
        console.log(values);
    };
    return (
        <RootView className={localClassName} style={style}>
            <Form
                style={{ '--border-bottom': 'none', '--border-inner': 'none', '--border-top': 'none' }}
                onFinish={onFinish}
                footer={
                    <Button block type="submit" color="primary" size="large">
                        提交
                    </Button>
                }>
                <Form.Item name="name" label="姓名" rules={[{ required: true }]}>
                    <JYInput></JYInput>
                </Form.Item>
                <Form.Item name="age" label="年龄" rules={[{ required: true }]}>
                    <JYInput></JYInput>
                </Form.Item>
                <Form.Item name="renqi" label={<span className="renqiSpan">人气</span>} rules={[{ required: true }]}>
                    <JYInput></JYInput>
                </Form.Item>
            </Form>
        </RootView>
    );
}
export default React.memo(TestJYInput as FC<IProps>);
const RootView = styled(View)`
    &.TestJYInput {
        .renqiSpan {
            color: #808a9d;
            font-size: 24px;
        }
    }
`;
